package work.wiwf.web.cfg;

import javax.annotation.Resource;
import javax.sql.DataSource;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.ssssssss.magicapi.datasource.model.MagicDynamicDataSource;

@Configuration
public class MagicDataCfg {

    @Resource
    private DataSource devDSource;

    @Bean
    MagicDynamicDataSource magicDynamicDataSource(){
        MagicDynamicDataSource dynamicDataSource = new MagicDynamicDataSource();
        dynamicDataSource.setDefault(devDSource);
        return dynamicDataSource;
    }

}
